package cn.lbd.arithmetic.leetcode.editor.cn;

public class ROL {
    public String LeftRotateString(String str,int n) {
        StringBuilder stringBuilder=new StringBuilder();
        String substring = str.substring(n, str.length());
        stringBuilder.append(substring);
        String substring1 = str.substring(0, n);
        stringBuilder.append(substring1);
        return String.valueOf(stringBuilder);
    }

    public static void main(String[] args) {
        ROL rol=new ROL();
        String str= rol.LeftRotateString("abcXYZdef", 3);
        System.out.println(str);//XYZdefabc
    }
}
